{php include wl_template('common/header');}
<ul class="nav nav-tabs">
	<li class="active"><a href="{php echo web_url('storeqr/sqrcode/post');}">生成二维码</a></li>
</ul>
<div class="app-content">
	<div class="app-form">
		<form class="form-horizontal form" action="" method="post" id="form1">
			<div class="panel panel-default">
				<div class="panel-heading">
					生成二维码
				</div>
				<div class="panel-body">
					<div class="form-group">
						<label class="col-sm-2 control-label">二维码类型</label>
						<div class="col-sm-9">
							<!--<label for="radio_1" class="radio-inline"><input type="radio" name="qrc-model" id="radio_1" value="1" {if empty($row['model']) || $row['model'] == 1}checked="checked"{/if} /> 临时</label>-->
							<label for="radio_0" class="radio-inline"><input type="radio" name="qrc-model" id="radio_0" value="2" checked="checked"> 含参</label>
							<!--<label for="radio_0" class="radio-inline"><input type="radio" name="qrc-model" id="radio_0" value="3"> 智能</label>-->
							<span class="help-block">含参即微信含参二维码，最多可生成十万个。</span>
						</div>
					</div>
					<div class="form-group">
						<label class="col-sm-2 control-label">二维码所属代理</label>
						<div class="col-sm-9">
							<select name="agentid" class="form-control select2" id="s">
								<option value="0" {if empty($id)}selected="selected"{/if}>不选择所属代理</option>
								{loop $remark_arr $row}
								<option value="{$row['id']}" {if $apply['aid'] == $row['id']}selected="selected"{/if}>{$row['agentname']}</option>
								{/loop}
							</select>
						</div>
					</div>
					<div class="form-group">
						<label class="col-sm-2 control-label">生成数量</label>
						<div class="col-sm-9">
							<input type="text" class="form-control" placeholder="" name="qr_num" value="{$apply['num']}" />
							<span class="help-block">单次生成数量最大为1万个</span>
						</div>
					</div>
					<div class="form-group">
						<label class="col-sm-2 control-label">场景备注</label>
						<div class="col-sm-9">
							<input type="text" class="form-control" placeholder="" name="remark" value="{$apply['remark']}" />
							<span class="help-block">用于区分二维码不同场景</span>
						</div>
					</div>
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-2 control-label"></label>
				<div class="col-sm-9">
					<input type="submit" name="submit" value="提交" class="btn btn-primary min-width" />
					<input type="hidden" name="token" value="{$_W['token']}" />
				</div>
			</div>
		</form>
	</div>
</div>
<script type="text/javascript">
	$("#form1").submit(function(){
		if($(":text[name='qr_num']").val() == '') {
			tip.msgbox.err('请填写二维码生成数量！');
			return false;
		}
		if($(":text[name='remark']").val() == '') {
			tip.msgbox.err('请填写场景备注！');
			return false;
		}
		if($(":text[name='qr_num']").val() <= 0) {
			tip.msgbox.err('二维码生成数量必须大于0！');
			return false;
		}
		if($(":text[name='qr_num']").val() > 10000) {
			tip.msgbox.err('二维码单次生成数量最大1万个！');
			return false;
		}
	});
</script>
{php include wl_template('common/footer');}